/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.findu.model;

import org.json.JSONObject;

/**
 *
 * @author 夏启根
 */
public class FUFamilyMember {

    public static final int SEX_Man = 1;
    public static final int SEX_Women = 2;
    public String id;
    public int sex;     //  性别
    public String name;     //  名
    public String surname;  //  姓
    public String lastname;  //  又名
    public int index;       //  排行

    public FUFamilyMember(FUFamilyMember m) {
        this.id = m.id;
        this.index = m.index;
        this.lastname = m.lastname;
        this.name = m.name;
        this.sex = m.sex;
        this.surname = m.surname;
    }

    public FUFamilyMember(JSONObject obj) {
        this.id = obj.optString("id");
        this.index = obj.optInt("seniority");
        this.lastname = obj.optString("lastname");
        this.name = obj.optString("name");
        this.sex = obj.optInt("sex");
        this.surname = obj.optString("surname");
    }
    /**
     * + " {" + " \"generation\": \"\"," + " \"birthday\": 1409189878000," + "
     * \"qq\": null," + " \"area\": null," + " \"familytreeid\":
     * \"a2f3e71d9181a67b\"," + " \"sex\": 2," + " \"generationNumber\": 0," + "
     * \"findu_userId\": null," + " \"deathdate\": null," + " \"type\": 0," + "
     * \"bealive\": true," + " \"lastname\": null," + " \"weixin\": null," + "
     * \"phone\": null," + " \"surname\": \"莫\"," + " \"imageUrl\": \"\"," + "
     * \"name\": \"言\"," + " \"id\": \"c279e471f4d180b0\"," + " \"time\":
     * 1440725889000," + " \"position\": {" + " \"homeplace_latitude\": 0," + "
     * \"address\": null," + " \"homeplace_longitude\": 0," + " \"homeplace\":
     * null," + " \"deathplace_longitude\": 0," + " \"latitude\": 0," + "
     * \"deathplace_latitude\": 0," + " \"deathplace\": null," + "
     * \"longitude\": 0" + " }," + " \"sina\": null," + " \"seniority\": 2" + "
     * }"
     *
     */

}
